package videoCourse.sort;

public class BubbleSort {
    public static void main(String[] args) {

        int[] arr = {5,7,2,9,4,1,0,5,7};
        for(int j = 0;j<arr.length-1;j++){
            for(int i = 0;i<arr.length-1-j;i++){
                if(arr[i] > arr[i+1]){
                    int temp = arr[i];
                    arr[i] = arr[i+1];
                    arr[i+1] = temp;
                }
            }
        }
        for(int i : arr){
            System.out.print(i+"  ");
        }

    }
}
